DEPS := deps
V8_PATH := $(DEPS)/v8
CO_PATH := $(DEPS)/pcl
COR_PATH := src
TEST_PATH := test

all: depends coroutine test

depends:
	cd $(CO_PATH) && make
	cd $(V8_PATH) && scons arch=x64

coroutine:
	cd $(COR_PATH) && make

withv8:
	cd $(COR_PATH) && make withv8

test: coroutine
	cd $(TEST_PATH) && make

run: test
	$(TEST_PATH)/coshell --shell $(TEST_PATH)/test.js

clean:
	cd $(COR_PATH) && make clean
	cd $(CO_PATH) && make clean
	cd $(TEST_PATH) && make clean
